<template>
  <div>
    <geo-map :height="chartHeight" :chart-data="chartData"></geo-map>
  </div>
</template>

<script>

  import GeoMap from "../../../components/Charts/GeoMap";

  export default {
    name: 'China',
    components: {GeoMap},
    data() {
      return {
        info: null,
        chartHeight: '100px',
        chartData: {
          name: '访问次数',
          dataList: [
            {
              "name": "北京",
              "value": 599
            },
            {
              "name": "上海",
              "value": 142
            },
            {
              "name": "陕西",
              "value": 520
            },
            {
              "name": "深圳",
              "value": 92
            },
            {
              "name": "湖北",
              "value": 810
            },
            {
              "name": "重庆",
              "value": 357
            },
            {
              "name": "甘肃",
              "value": 224
            },
            {
              "name": "青海",
              "value": 168
            },
            {
              "name": "宁夏",
              "value": 311
            },
            {
              "name": "四川",
              "value": 453
            },
            {
              "name": "新疆",
              "value": 448
            },
            {
              "name": "西藏",
              "value": 809
            },
          ]
        },
      }
    },
    created() {
      const h = window.innerHeight;
      this.chartHeight = (h - 50) + 'px';
      //console.log(this.chartHeight);
    },
    methods: {
      handleClick(message) {
        this.$message(message);
      },
      showInfo(info) {
        this.$alert(info, '提示', {
          confirmButtonText: '确定',
          callback: action => {
            this.$message({
              type: 'info',
              message: `action: ${action}`
            });
          }
        });
      }
    }
  }
</script>

<style rel="stylesheet/scss" lang="scss" scoped>

</style>
